<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<?php 
    echo "submit success <br/>";
    echo "what you submit <br/>";
    $names=$_POST["names"];
   $bir=$_POST["birth"];

   for ($i=0;$i<count($names);$i++){
       echo $names[$i]."   ";
       echo $bir[$i];
       echo "<br/>";
   }

   $file=fopen("whobir.txt","a") or exit("unable to write");

   for ($i=0;$i<count($names);$i++){
    $name=$names[$i];
    $birstr = $bir[$i];
    $singlemes = $name."*".$birstr."\n";
    fwrite($file,$singlemes);
}
fclose($file);
?>
</body>
</html>




